#!/bin/sh

mkdir ISVP-lib
export INSTALL_DIR=`pwd`/ISVP-lib

#create file
cd ISVP-lib
mkdir lib
mkdir bin
mkdir include
cd -

cd ISVP-lib/include
mkdir liveMedia
mkdir BasicUsageEnvironment
mkdir UsageEnvironment
mkdir groupsock
cd -

cd ISVP-lib/bin
mkdir testProgs
mkdir mediaServer
mkdir proxyServer
cd -

#copy include
cp liveMedia/include/*.hh ISVP-lib/include/liveMedia
cp BasicUsageEnvironment/include/*.hh ISVP-lib/include/BasicUsageEnvironment
cp UsageEnvironment/include/*.hh ISVP-lib/include/UsageEnvironment
cp groupsock/include/*.hh ISVP-lib/include/groupsock

#copy lib
cp liveMedia/libliveMedia.a ISVP-lib/lib
cp BasicUsageEnvironment/libBasicUsageEnvironment.a ISVP-lib/lib
cp UsageEnvironment/libUsageEnvironment.a ISVP-lib/lib
cp groupsock/libgroupsock.a ISVP-lib/lib

cd testProgs
cp MPEG2TransportStreamIndexer openRTSP playSIP registerRTSPStream sapWatch testAMRAudioStreamer testDVVideoStreamer testH264VideoStreamer testH264VideoToTransportStream testH265VideoStreamer testH265VideoToTransportStream testMKVStreamer  testMP3Receiver testMP3Streamer testMPEG1or2AudioVideoStreamer testMPEG1or2ProgramToTransportStream testMPEG1or2Splitter testMPEG1or2VideoReceiver testMPEG1or2VideoStreamer testMPEG2TransportReceiver testMPEG2TransportStreamer testMPEG2TransportStreamTrickPlay testMPEG4VideoStreamer testOggStreamer testOnDemandRTSPServer testRelay testReplicator testRTSPClient testWAVAudioStreamer vobStreamer ../ISVP-lib/bin/testProgs/
cd -

cd mediaServer
cp live555MediaServer ../ISVP-lib/bin/mediaServer/
cd -

cd proxyServer
cp live555ProxyServer ../ISVP-lib/bin/proxyServer/
cd -

